.chat-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

// 新增：兼职信息栏样式
.job-info-bar {
  background-color: #f5f5f5;
  padding: 15rpx 30rpx;
  border-bottom: 1rpx solid #e5e5e5;
}

.job-header {
  display: flex;
  align-items: center;
  margin-bottom: 10rpx;
}

.job-status {
  background-color: #4cd964;
  color: white;
  font-size: 24rpx;
  padding: 2rpx 10rpx;
  border-radius: 4rpx;
  margin-right: 10rpx;
}

// 新增：用户状态图片样式
.user-status {
  width: 40rpx;
  height: 40rpx;
  margin-left: 10rpx;
  margin-right: 10rpx;
}

.job-title {
  flex: 1;
  font-size: 32rpx;
  font-weight: bold;
}

.job-salary {
  color: #ff3b30;
  font-size: 32rpx;
  font-weight: bold;
}

.job-details {
  display: flex;
  flex-wrap: wrap;
  gap: 10rpx 20rpx;
  margin-bottom: 10rpx;
}

.detail-item {
  font-size: 26rpx;
  color: #333;
  background: #EEF2F3;
  padding: 4rpx 15rpx;
  border-radius: 15rpx;
}

.job-location {
  display: flex;
  flex-direction: column; // 修改为垂直排列
  align-items: flex-start; // 左对齐
  position: relative;
  font-size: 26rpx;
  color: #666;
  line-height: 36rpx;
  padding-top: 10rpx; // 增加顶部内边距
}

.distance-text {
  color: #ff3b30; // 改为红色突出显示
  margin-left: 0; // 移除左侧边距
  margin-top: 5rpx; // 增加顶部边距
  font-weight: 500; // 加粗字体
}

.location-text {
  flex: 1;
}

.distance-text {
  color: #888;
  margin-left: 15rpx;
  white-space: nowrap;
}

.share-icon {
  width: 40rpx;
  height: 40rpx;
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
}

.chat-messages {
  flex: 1;
  padding: 20rpx;
  overflow-y: auto;
  background-color: #f5f5f5;
  height: calc(100vh - 400rpx);
  /* 确保高度计算正确 */
  box-sizing: border-box;
  /* 添加盒模型计算 */
  display: block !important;
  visibility: visible !important;
}

.message-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 15px;
}

.other-message {
  justify-content: flex-start;
}

.my-message {
  justify-content: flex-end;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin: 0 10px;
  position: relative;
  top: 110rpx;
}

.other-message .message-bubble {
  background-color: #f0f0f0;
  border-radius: 18px 18px 18px 0;
  position: relative;
  top: 0px;
  // 移除最大宽度限制
}

.my-message .message-bubble {
  background-color: #007aff;
  color: white;
  border-radius: 18px 18px 0 18px;
  // 移除最大宽度限制
  margin-left: auto;
}

.my-message .message-bubble {
  max-width: 75%; // 控制消息最大宽度
  margin-left: auto; // 新增：自动左侧边距将内容推到右侧
  border-top-right-radius: 8rpx;
  color: #ffffff;
}


.my-message .avatar {
  width: 80rpx;
  height: 80rpx;
  border-radius: 50%;
  margin-left: 20rpx; // 修改：添加左侧margin
  margin-right: -100rpx; // 修改：移除右侧margin
  margin-bottom: 20rpx; // 新增：微调头像位置使其略低于消息
}

.my-message .message-content {
  max-width: 75%; // 修改：增加消息最大宽度
  color: #fff;
  padding: 24rpx 30rpx; // 调整内边距
  font-size: 32rpx;
}

.message-content {
  display: flex;
  flex-direction: column;
}

.message-bubble {
  padding: 22rpx 28rpx; // 增大内边距
  border-radius: 24rpx; // 更圆润边角
  font-size: 32rpx; // 增大字体
  line-height: 48rpx;
  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1); // 添加阴影效果

}

.other-message .message-bubble {
  border-top-left-radius: 8rpx; // 左上角圆角调整
  background-color: #ffffff;
  // 新增：添加左侧三角箭头
  position: relative;
  &::before {
    content: '';
    position: absolute;
    left: -12rpx;
    top: 24rpx;
    width: 0;
    height: 0;
    border-top: 10rpx solid transparent;
    border-right: 20rpx solid #ffffff;
    border-bottom: 10rpx solid transparent;
  }
}

.my-message .message-bubble {
  border-top-right-radius: 8rpx; // 右上角圆角调整
  background-color: #7ccc63;
  color: #ffffff;
  border-top-right-radius: 4rpx; // 右上角圆角减小
  // 新增：添加右侧三角箭头
  position: relative;
  &::after {
    content: '';
    position: absolute;
    right: -12rpx;
    top: 24rpx;
    width: 0;
    height: 0;
    border-top: 10rpx solid transparent;
    border-left: 20rpx solid #7ccc63;
    border-bottom: 10rpx solid transparent;
  }
}

// 修改时间戳样式
.message-time {
  font-size: 26rpx;
  color: #888888;
  margin: 15rpx auto; // 居中显示
  padding: 4rpx 16rpx;
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 12rpx;
  align-self: center;
}

// 调整消息项布局
.message-item {
  margin-bottom: 20rpx;
  max-width: 85%; // 增加最大宽度
}

.input-area {
  display: flex;
  padding: 15rpx 20rpx;
  border-top: 1rpx solid #e5e5e5;
  background-color: #ffffff;
  align-items: center;
}

// 新增：表情按钮
.emoji-btn {
  width: 50rpx;
  height: 50rpx;
  margin-right: 15rpx;
}

.message-input {
  flex: 1;
  height: 80rpx;
  border: 1rpx solid #e5e5e5;
  border-radius: 40rpx;
  padding: 0 30rpx;
  font-size: 30rpx;
}

.send-btn {
  width: 120rpx;
  height: 80rpx;
  background-color: #7ccc63;
  color: #ffffff;
  border-radius: 40rpx;
  margin-left: 15rpx;
  font-size: 30rpx;
}

//头部信息
// 头部用户信息样式
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20rpx 30rpx;
  height: 120rpx;
  background-color: #ffffff;
  border-bottom: 1rpx solid #f5f5f5;
  margin-bottom: 20rpx;
}

.user-info {
  display: flex;
  align-items: center;
  position: relative;
  left: 170rpx;
  top: 50rpx;
}

.user-text {
  display: flex;
  align-items: center;
  margin-left: 15rpx;
}

.title {
  font-size: 34rpx;
  font-weight: bold;
  color: #333333;
  margin-right: 10rpx;
}

.subtitle {
  font-size: 24rpx;
  color: #F76F17;

  padding: 2rpx 12rpx;

  width: 50rpx;
  height: 32rpx;
  background: #FFF3EB;
  border-radius: 7rpx;
}

// 添加消息发送状态样式
.message-status {
  font-size: 22rpx;
  color: #aaa;
  margin-left: 10rpx;
  align-self: flex-end;
}